<?php
    require ( 'init.inc.php' );
    require ( 'checkadmin.inc.php');
    require ( __COMM_PATH . 'pagecontrol.inc.php' );
    require ( __CLASS_PATH . 'page_list.class.php' );
	
	
    // -------------------------------------------------------
    // 接收传递过来的变量
    // -------------------------------------------------------
    $id = addslashes($_REQUEST["id"]);
	$action = $_REQUEST["action"];
    $stype = $_REQUEST["stype"];
	
    // -------------------------------------------------------
    // 批量操作(删除,审核,取消审核)
    // -------------------------------------------------------
    if (!empty($id)) {
      if($action=="del"){
		  $db->query("delete from `{$tablepre}leaveword` where id in ($id)"); 
						  file_log($_SESSION['AdminUser'],"删除留言");
        }
    }
	
	// -------------------------------------------------------
    // 页面基本设置
    // -------------------------------------------------------
	
    $page_title   = $ptitle["reply_list"];
    $page_size    = 15;
    $display_page = "leaveword_list.html";
    $sortby       = "id";
    $oexp         = "desc";
 
    $query_sql    = "select * from `{$tablepre}leaveword`";
  
    // -------------------------------------------------------
    // 执行页面处理
    // -------------------------------------------------------
    show_page_head("list",$page_title);
    $plist = new PageList($page_title, $page_size);
    $plist->SortOpen = true;
    $plist->SetSort($sortby, $oexp);
    $plist->SetUrlParam($url_para_arr);
    $plist->Execute($query_sql);
    $plist->TplParse($display_page);
    show_page_foot();
    $db->close();
?>